package cn.edu.ctbu.lab.service;


import cn.edu.ctbu.lab.domain.Student;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public interface StudentService {

    Optional<Student> findById(Integer id);
    List<Student> findAll();
    Page<Student> findByPage(int pageIndex, int pageSize);
    Student add(Student student);
    Student update(Student student);
    int delete(Student student);
    int delete(Integer id);
    Student validUserNameAndPassword(String name,String password)  throws  Exception;
}
